var foo = /^abc[a-zA-Z]/;
var foo = /^abc/;
var foo = /[\\[]/;
var foo = /[\\]]/;
var foo = /\\[][\\]]/;
var foo = /[a-zA-Z\\[]/;
var foo = /[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\^\\$\\|]/g;
var foo = /\\s*:\\s*/gim;
var foo = /[^]/;
var foo = /\\[][^]/;
var foo = /[\\]]/uy;
var foo = /[\\]]/s;
var foo = /[\\]]/d;
var foo = /\\[]/
var foo = /[[^]]/v;
var foo = /[[\\]]]/v;
var foo = /[[\\[]]/v;
var foo = /[a--b]/v;
var foo = /[a&&b]/v;
var foo = /[[a][b]]/v;
var foo = /[\\q{}]/v;
var foo = /[[^]--\\p{ASCII}]/v;

/^abc/.test("abcdefg"); // true
"abcdefg".match(/^abc/); // ["abc"]

/^abc[a-z]/.test("abcdefg"); // true
"abcdefg".match(/^abc[a-z]/); // ["abcd"]

/^abc[^]/.test("abcdefg"); // true
"abcdefg".match(/^abc[^]/); // ["abcd"]